<?php
function get_diagnosa($id_klaim){
	$sql_diagnosis="select a.id_klaim,a.icd10 as id_diagnosis, b.nama as nama_diagnosis from klaim_diagnosis a 
	inner join master_diagnosis b on a.icd10=b.icd10
					 where a.id_klaim='".$id_klaim."'";
	//$sql_diagnosis;
	$qry_diagnosis=mysql_query($sql_diagnosis);
	$num_diagnosis=mysql_num_rows($qry_diagnosis);
	$str="";
	while($hasil=mysql_fetch_array($qry_diagnosis)){
		$str.=$hasil['id_diagnosis']."<br><br>";
	}
	return $str;
}

function get_inacbg($id_klaim){
	$sql_diagnosis="select a.kode_inacbg, b.deskripsi,c.tarif_inacbg as tarif,a.tarif_ditanggung from 
						klaim_inacbg a inner join master_inacbg b on a.kode_inacbg=b.kode_inacbg 
						inner JOIN tarif_inacbg c ON b.kode_inacbg=c.kode_inacbg
					 where a.id_klaim='".$id_klaim."'";
	//$sql_diagnosis;
	$qry_diagnosis=mysql_query($sql_diagnosis);
	$num_diagnosis=mysql_num_rows($qry_diagnosis);
	$str="";
	while($hasil=mysql_fetch_array($qry_diagnosis)){
		$str.=$hasil['kode_inacbg']."<br><br>";
	}
	return $str;
}

function get_prosedur($id_klaim){
	$sql_diagnosis="select a.icd9cm, b.nama_prosedur from 
						klaim_prosedur a inner join master_prosedur b on a.icd9cm=b.icd9cm 
						
					 where a.id_klaim='".$id_klaim."'";
	//$sql_diagnosis;
	$qry_diagnosis=mysql_query($sql_diagnosis);
	$num_diagnosis=mysql_num_rows($qry_diagnosis);
	$str="";
	while($hasil=mysql_fetch_array($qry_diagnosis)){
		$str.=$hasil['icd9cm']."<br><br>";
	}
	return $str;
}
?>